
type TO = {
  name: string;
  age?: number;
  // 整体指定 sum 的类型
  // sum?: (n1: number, n2: number) => number
  // 分别指定参数和返回指定的类型
  sum?(n1: number, n2: number): number
}

const o:TO  = {
  name: '吕布',
}

console.log(o);
export {}